<script>
export default {
  beforeCreate() {
    const { params, query } = this.$route;
    const { path } = params;
    // 此处的query是路由地址带的查询参数
    this.$router.replace({ path: '/' + path, query });
  },
  render: function(h) {
    return h(); // avoid warning message
  }
};
</script>
